import 'package:flutter/material.dart';
import 'dart:math';

class AppColors {
  AppColors._();

  static const whiteColor = Color(0xFFFFFFFF);
  static const blackColor = Color(0xFF000000);
  static const clearColor = Color(0x00000000);

  static const searchBackgroundColor = Color(0xFFF5F5F5);
  //主色调
  static const Color mainColor = Color(0xFFF63A79);

  static const Color mainBGColor = Color(0xFFFFEEF4);
  static const Color mainBorderColor = Color(0xFFFFA2C1);
  //边框颜色
  static const Color borderColor = Color(0xFFEEEEEE);

  // 背景颜色
  static const Color bgColor = Color(0xFFFEDCE0);

// 文字颜色
  static const Color textColor = Color(0xFF3D0007);

// 按钮开始颜色
  static const Color btnColorStart = Color(0xFFFA6B74);

// 按钮结束颜色
  static const Color btnColorEnd = Color(0xFFF89500);

// 按钮投影颜色
  static const Color btnShadowColor = Color(0x33D83131);

  static const colorB8C0D4 = Color(0xFFB8C0D4);

// 输入框边框颜色
  static const Color inputBorderColor = Color(0xFFECECEC);
  static const Color iconLightColor = Colors.blue;
  static const Color iconDarkColor = Colors.red;
  static const Color messageBgLightColor = inputBorderColor;
  static const Color messageBgDarkColor = Colors.grey;

  static const Color color333333 = Color(0xff333333);
  static const Color color666666 = Color(0xff666666);

  static const Color color999999 = Color(0xff999999);
  static const Color color202020 = Color(0xff202020);
  static const Color color404040 = Color(0xff404040);
  static const Color color162b09 = Color(0xff162b09);
  static const colorCCFF78 = Color(0xFFccff78);
  static const color78FF85 = Color(0xFF78FF85);
  static const color65616E = Color(0xFF65616E);
  static const colorD7FFDF = Color(0xFFD7FFDF);
  static const color565656 = Color(0xFF565656);
  static const colorF4FDF1 = Color(0xFFF4FDF1);
  static const colorF4f4f4 = Color(0xFFf4f4f4);
  static const colorA9A9A9 = Color(0xFFA9A9A9);
  static const colorCCCCCC = Color(0xFFCCCCCC);
  static const colorF6F8FA = Color(0xFFF6F8FA);
  static const colorF9FDF0 = Color(0xFFF9FDF0);
  static const color39910F = Color(0xFF39910F);
  static const color44FC04 = Color(0xFF44FC04);
  static const colorF3F8F6 = Color(0xFFF3F8F6);
  static const color17BC14 = Color(0xFF17BC14);
  static const color86FB8C = Color(0xFF86FB8C);
  static const color454545 = Color(0xFF454545);
  static const colorEEFDEF = Color(0xFFEEFDEF);
  static const colorEEFCFD = Color(0xFFEEFCFD);
  static const colorF3FFF5 = Color(0xFFF3FFF5);
  static const colorF4FFDC = Color(0xFFF4FFDC);
  static const colorEDEDED = Color(0xFFEDEDED);
  static const color142220 = Color(0xFF142220);
  static const colorF8FDEE = Color(0xFFF8FDEE);
  static const colorF2F2F2 = Color(0xFFF2F2F2);
  static const color457E0D = Color(0xFF457E0D);
  static const color3A8927 = Color(0xFF3A8927);
  static const colorC7F4AC = Color(0xFFC7F4AC);

  static const colorf5f5f5 = Color(0xFFf5f5f5);
  static const colorfafafa = Color(0xFFfafafa);
  static const colorbfbfbf = Color(0xFFbfbfbf);
  static const colorFFF1F6 = Color(0xFFFFF1F6);
  static const colorFFD5E3 = Color(0xFFFFD5E3);
  static const colorFFEEF4 = Color(0xFFFFEEF4);
  static const colorE4F9F9 = Color(0xFFE4F9F9);
  static const colorDB6B5 = Color(0xFF2DB6B5);
  static const colord8d8d8 = Color(0xFFd8d8d8);
  static const colord9d9d9 = Color(0xFFd9d9d9);
  static const color4f91f3 = Color(0xFF4f91f3);
  static const color2db6b5 = Color(0xFF2db6b5);
  static const coloreeeeee = Color(0xFFeeeeee);
  static const color5B8FF9 = Color(0xFF5B8FF9);
  static const color1A5B8FF9 = Color(0x1A5B8FF9);
  static const color8CB2FF = Color(0xFF8CB2FF);
  static const colo91B5FF = Color(0xFF91B5FF);
  static const colo90E3CA = Color(0xFF90E3CA);
  static const colo95A9C2 = Color(0xFF95A9C2);

  static const Color dialogCancelTextColor = Color(0xFFBDBDBD);
  static const Color halfClearColorBlack = Color.fromARGB(77, 0, 0, 0);
  static const Color halfClearColorWhite = Color(0xccffffff);

  static Color randomColor = Color.fromARGB(
      255, Random().nextInt(255), Random().nextInt(255), Random().nextInt(255));
}

Color randomColor() {
  return Color.fromARGB(
      255, Random().nextInt(255), Random().nextInt(255), Random().nextInt(255));
}

Color colorWithRGBA(
    {required int r, required int g, required int b, double a = 1}) {
  if (a > 1) {
    a = 1;
  }
  return Color.fromARGB((255 * a).toInt(), r, g, b);
}

// 按钮渐变背景色
const LinearGradient btnLinearGradient = LinearGradient(
  colors: [
    AppColors.btnColorStart,
    AppColors.btnColorEnd,
  ],
);
